import MfDataManage from 'comp/mf-data-manage.js';
import { marked } from 'lib/maked@13.0.2/marked.esm.js';
export default {
    components: {
        MfDataManage
    },
    data(){
        return {
            operations:{
                label: '操作',
                show: true,
                width: 150,
                mode: 'text',
                buttons: [
                    {
                        label: '详情',
                        name: 'detail',
                        click: row => {
                            this.receiveDialogVisible = true;
                            this.receiveText = marked(row.receive_text);
                        }
                    },
                    'delete'
                ]
            },
            receiveDialogVisible:false,
            receiveText:''
        }
    },
    template: /*html*/`
<div class="mf-page-chat-message">
    <mf-data-manage ref="manageRef" table-name="chat:message" :table-column-operations="operations"></mf-data-manage>
    <el-dialog
        v-model="receiveDialogVisible"
        title="回复内容"
        width="70%"
    >
        <div style="min-height: 70vh; overflow-y: auto; font-size:16px; padding:10px;">
            <div v-html="receiveText"></div>
        </div>
  </el-dialog>
</div>
`,
}